home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 07 CP_M / CLK128.LBR / CLOCK.DZC / CLOCK.DOC
Encoding:
Text File  |  2019-04-13  |  5.4 KB  |  119 lines

  1.  
  2.                               CLOCK
  3.                    For Commodore 128 CP/M Plus
  4.                            Version 1.1
  5.  
  6.                           Gene Pizzetta
  7.                         December 6, 1987
  8.  
  9.  
  10. CLOCK is a utility to read "The Right Time" clock-calendar and 
  11. set the system time and date under CP/M Plus on the Commodore 
  12. 128.  The current time and date is also displayed at the console.
  13.  
  14. USAGE:
  15.  
  16.      CLOCK
  17.  
  18. No parameters are needed on the command line.
  19.  
  20. Put the CLOCK command in your PROFILE.SUB and the CP/M system 
  21. time and date will be set automatically everytime you boot up.  
  22. Your disk file date stamping will always be correct.  If you use 
  23. MAKE+ to compile or assemble programs, it will always work 
  24. correctly, even if you are crashing the system every 10 or 15 
  25. minutes testing a buggy program.
  26.  
  27. CLOCK has one small bug.  When you call CLOCK from the CP/M 
  28. command line, if the system time was previously set to a time 
  29. later than the real time that the clock provides, the date will 
  30. be advanced a day by the warm boot.  The apparent reason for this 
  31. is that when the BDOS or CCP checks the time and finds it is 
  32. earlier than the last time it checked, it is assumed that a new 
  33. day has arrived and that the date should be incremented.  I don't 
  34. know a way around this, but there may be a flag somewhere that I 
  35. haven't found yet.  This situation should be a rare occurrence 
  36. for most people.  In any case running CLOCK a second time will 
  37. set the date correctly.
  38.  
  39. THE RIGHT TIME CLOCK:  The Right Time is a trademark of Ardelt 
  40. Engineering Company for their battery-backed clock-calendar for 
  41. the Commodore 64 and 128.  The clock plugs into the User Port 
  42. and, if you use a 1670 modem, it will plug into the back of the 
  43. clock.  The RTC does not interfere with any CP/M functions, 
  44. including Drive M: (the RAM disk).  You can get more information 
  45. from:
  46.      Ardelt Engineering Company
  47.      8175 East 39th Avenue
  48.      Denver, CO  80207
  49.      (800) 237-2943 for orders
  50.      (303) 355-1763 for technical information
  51.  
  52. SOURCE CODE:  The source code is pretty well commented 
  53. throughout.  If you want to make some changes, you should not 
  54. have any trouble figuring out what's going on at any point.
  55.  
  56. Much of this code is not original.  For the clock reading 
  57. routines I relied heavily on the C-128 native mode driver written 
  58. and copyrighted by Stephen Ardelt of Ardelt Engineering, 
  59. manufacturers of The Right Time clock-calendar.  The most 
  60. important changes were translating 6502 code to Z80 code and 
  61. using Z80 "in" and "out" instructions to access the I/O chips, 
  62. which are not visible in the banks in which CP/M operates (0 and 
  63. 1).
  64.  
  65. Most of the subroutine to put the date in DRI format was taken 
  66. from UNDATE.ASM, a procedure written by S. Kluger of the El Paso 
  67. RCP/M.  It is in the public domain.  The original routine was 
  68. written to read the time and date as ASCII strings, so it was 
  69. modified to accept binary input.
  70.  
  71. CLOCK was developed using SLRMAC, SLR Systems miraculous 
  72. assembler.  The source file can be assembled with MAC and HEXCOM, 
  73. however, by changing the filetype from .MAC to .ASM.  MAC will 
  74. also require that you have Z80.LIB on the default drive.
  75.  
  76. (Note that MAC will generate a meaningless error when it finds a 
  77. line with an exclamation point in a comment.  Ignore the error; 
  78. the generated code will be fine.)
  79.  
  80. HISTORY:  For the two and a half years that I've been using my C- 
  81. 128 I've been thinking how nice it would be to have a battery- 
  82. backed clock like those available for MS-DOS machines.  It does 
  83. get a little tiresome entering the date and time on every boot 
  84. using DATE.COM, especially when I'm working on a machine language 
  85. program that keeps crashing the system.
  86.  
  87. About a year ago I heard about a clock that used the Expansion 
  88. Port (where the RAM expansion goes), but another CP/M user 
  89. reported that it interfered with the RAM disk, so I considered it 
  90. no longer.  More recently I read about Ardelt Engineering's Right 
  91. Time clock that plugged into the User Port (where the modem 
  92. goes), so I called them to find out about it.  Stephen Ardelt 
  93. assured me that his clock would not interfere with the CP/M in 
  94. any way, but that driver programs were included only for 64 and 
  95. 128 modes.  He suggested that it shouldn't be particularly 
  96. difficult to write a CP/M utility to read the clock.  I bit and 
  97. he was right on all counts.
  98.  
  99. Version 1.0 -- December 5, 1987 -- original version.  It reads 
  100.      and it sets!!!
  101.  
  102. Version 1.1 -- December 7, 1987 -- Added date and time display to 
  103.      console.
  104.  
  105. Please report any bugs or make any suggestions to me by mail, 
  106. phone, or modem:
  107.                                         Gene Pizzetta
  108.                                         481 Revere Street
  109.                                         Revere, MA  02151
  110.                                         Voice:  (617) 284-0891
  111.                                         CompuServe:  72060,505
  112.                                         GEnie:  E.Pizzetta
  113.                                         Q-Link:  GeneP
  114.  
  115. "The Right Time" is a trademark of Ardelt Engineering Company.  
  116. "Commodore 64" and "Commodore 128" are trademarks of Commodore 
  117. Electronics Ltd.  "CP/M" and "CP/M Plus" are trademarks of 
  118. Digital Research Inc.
  119.